<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<!--1.将A5F3转成2进制-->
<script type="text/javascript">
   var i='A5F3';      
    var num = parseInt(i,16);
  var num1 = num.toString(2);
   console.log(num1);
</script>


<!--2.99乘法表-->
<script type="text/javascript">
    
    for (var i = 1; i <= 9; i++) {
        for (var j = 1; j <= i; j++) {
            document.write(j+'*'+ i + '=' + i*j+'&nbspt' );
        }
       document.write('<br>')
    }

</script>

<!--3.输入年月，（用数组）    -->
<script type="text/javascript">
    var  year =prompt('请输入年份');
    var month =prompt('请输入月份')
    
</script>
<!--3.1.计算当月有多少天 --> <!--3.2.计算还剩多少天-->
<script type="text/javascript">  
    var  year =prompt('请输入年份');
    var month =prompt('请输入月份');
    var day  =prompt('请输入第几日')
      switch (month) {
            case 1:
            case 3:
            case 5:
            case 7:
            case 8:
            case 10:
            case 12:
                document.write('这个月有31天');
                document.write('&nbspt')
                document.write('还剩'+(31-day)+'天');
                break;
            case 2:
            if(ayear %4==0&&ayear%100!==0||ayear%400==0){
                document.write('这个月有29天');  
                document.write('&nbspt')
                document.write('还剩'+(29-day)+'天');        
            } else{
                document.write('这个月有28天');
                document.write('&nbspt')
                document.write('还剩'+(28-day)+'天');
                }
                break;
            case 4:
            case 6:
            case 9:
            case 11:
            document.write('这个月有30天');
            document.write('&nbspt')
            document.write('还剩'+(30-day)+'天');
                break;
            default:
                break;
        }
</script>
</body>
</html>